from django.db import models
from datetime import datetime


class PlatformConfig(models.Model):
    id = models.AutoField(primary_key=True)
    platform = models.CharField(verbose_name='平台名称', max_length=30)
    platform_en = models.CharField(verbose_name='平台名称英文', max_length=30)
    platform_logo_addr = models.CharField(verbose_name='平台logo地址', max_length=200)
    support_login_types = models.CharField(verbose_name='所有支持的登录方式', max_length=100)
    work_type = models.CharField(verbose_name='作品类型', max_length=30)

    has_cover_img = models.CharField(verbose_name='是否有封面', max_length=30)
    cover_img_size = models.CharField(verbose_name='封面大小', max_length=30)
    cover_img_width = models.CharField(verbose_name='封面最佳宽度', max_length=30)
    cover_img_height = models.CharField(verbose_name='封面最佳高度', max_length=30)

    chapter_img_1_size = models.CharField(verbose_name='章节图片大小1', max_length=30)
    chapter_img_1_width = models.CharField(verbose_name='章节图片最佳宽度1', max_length=30)
    chapter_img_1_height = models.CharField(verbose_name='章节图片最佳高度1', max_length=30)
    third_id = models.IntegerField(verbose_name='第三方id  0没有  1必有',default=0,)

    chapter_img_2_size = models.CharField(verbose_name='章节图片大小2', max_length=30)
    chapter_img_2_width = models.CharField(verbose_name='章节图片最佳宽度2', max_length=30)
    chapter_img_2_height = models.CharField(verbose_name='章节图片最佳高度2', max_length=30)

    create_time = models.DateTimeField(verbose_name='创建时间', default=datetime.now)
    update_time = models.DateTimeField(verbose_name='修改时间', default=datetime.now)

    class Meta:
        verbose_name = '平台配置表'
